/*
* $Id: TreeSettings.h 2 2009-12-23 13:58:02Z volok-aleksej@yandex.ru $
*
* Copyright 2008 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _TREE_SETTINGS_H_
#define _TREE_SETTINGS_H_

class CSettingsWin;

struct Item{
	std::tstring m_strValueItem;
	bool m_bHeader;
	Item(const std::tstring& strValueItem, bool bHeader){
		m_bHeader = bHeader;
		m_strValueItem = strValueItem;
	}
	bool operator == (const std::tstring& strValue){
		return m_strValueItem == strValue;
	}
};

class CTreeSettings : public CListBox{
	CSettingsWin* m_pParent;
	CBitmap m_Bitmap;
	CFont* m_pFontHeader;
	CFont* m_pFontElement;
	std::vector<Item> m_aItems;
protected:
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
public:
	CTreeSettings(CSettingsWin* pParent);
	virtual ~CTreeSettings();
};

#endif /*_TREE_SETTINGS_H_*/